import request from "@/utils/request";

// 查询金蝶-财务-应收票据列表
export function getList(query) {
    return request({
        url: "/heart/KingFinanceReceiptBill/list",
        method: "get",
        params: query,
    });
}

// 查询金蝶-财务-应收票据详细
export function getDetail(id) {
    return request({
        url: "/heart/KingFinanceReceiptBill/" + id,
        method: "get",
    });
}

// 新增金蝶-财务-应收票据
export function addInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill",
        method: "post",
        data: data,
    });
}

// 修改金蝶-财务-应收票据
export function editInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill",
        method: "put",
        data: data,
    });
}
// 修改金蝶-财务-应收票据-到期付款
export function editPay(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/pay",
        method: "post",
        data: data,
    });
}
// 修改金蝶-财务-应收票据-退票
export function editRefund(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/refund",
        method: "post",
        data: data,
    });
}

// 删除金蝶-财务-应收票据
export function deleteInfo(id) {
    return request({
        url: "/heart/KingFinanceReceiptBill/" + id,
        method: "delete",
    });
}

// 导出金蝶-财务-应收票据
export function exportInfo(query) {
    return request({
        url: "/heart/KingFinanceReceiptBill/export",
        method: "get",
        params: query,
    });
}

// 查询是否有付款权限
export function queryStatus(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/queryStatus",
        method: "post",
        data,
    });
}
// 背书
export function reciteInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/recite",
        method: "post",
        data,
    });
}
// 背书退回
export function reciteRefundInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/reciteRefund",
        method: "post",
        data,
    });
}
// 拆分
export function splitInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/split",
        method: "post",
        data,
    });
}
// 贴现
export function discountInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/discount",
        method: "post",
        data,
    });
}
// 质押
export function pledgeInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/pledge",
        method: "post",
        data,
    });
}
// 撤押
export function unPledgeInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/unPledge",
        method: "post",
        data,
    });
}
// 收款
export function recepitInfo(data) {
    return request({
        url: "/heart/KingFinanceReceiptBill/receipt",
        method: "post",
        data,
    });
}
